#ifndef YCCONTROLSAUTOUPDATEDIALOG_H
#define YCCONTROLSAUTOUPDATEDIALOG_H
#include <QDialog>

QT_BEGIN_NAMESPACE
class QProgressBar;
class QTimer;
QT_END_NAMESPACE

namespace yc {

class Downloader;
class Service;
struct Pack;

class AutoUpdateDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AutoUpdateDialog(QWidget* parent = nullptr);
    ~AutoUpdateDialog() override;

    int start(Service* service, const QList<Pack>& packs);

Q_SIGNALS:
    void beginToInstall();

protected:
    void keyPressEvent(QKeyEvent* ke) override;

private:
    QProgressBar* progress_bar_;
    Downloader* task_;
};

} // namespace yc

#endif // YCCONTROLSAUTOUPDATEDIALOG_H
